package com.rd.student.ruanjian.class3.zhangsitao.KaoShi;

import java.util.LinkedList;

public class Test1 {

    public static void main(String[] args) {

        LinkedList list = new LinkedList();
        Student ZhangSan = new Student("张三",20,90,110);
        Student LiSi = new Student("李四",99,88,187);
        Student WangWu = new Student("王五",100,100,200);

        list.add(ZhangSan);
        list.add(LiSi);
        list.add(WangWu);

        System.out.println(list);
    }

    public static class Student {

        private String name;
        private int scoreM;
        private int scoreC;
        private int scoreAll;

        public Student(String name, int scoreC, int scoreM, int scoreAll) {
            this.name = name;
            this.scoreAll = scoreAll;
            this.scoreC = scoreC;
            this.scoreM = scoreM;
        }


        public String getName() {
            return name;
        }

        public int getScoreM() {
            return scoreM;
        }

        public int getScoreC() {
            return scoreC;
        }

        public int getScoreAll() {
            return scoreAll;
        }

        public void setName(String name) {
            this.name = name;
        }

        public void setScoreM(int scoreM) {
            this.scoreM = scoreM;
        }

        public void setScoreC(int scoreC) {
            this.scoreC = scoreC;
        }

        public void setScoreAll(int scoreAll) {
            this.scoreAll = scoreAll;
        }

        @Override
        public String toString() {
            return "Student{" +
                    "name='" + name + '\'' +
                    ", scoreM=" + scoreM +
                    ", scoreC=" + scoreC +
                    ", scoreAll=" + scoreAll +
                    '}';
        }
    }
}
